package com.haozi;

import com.haozi.config.BaiduConfig;
import com.haozi.config.DataSourcelConfig;
import com.haozi.core.DataMonitor;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author zyh
 * @version 1.0
 * @date 2022/4/27 10:45 上午
 */
@Slf4j
public class BootStrap {


    public static void main(String[] args) {

        //spring 上下文 初始化
        AnnotationConfigApplicationContext
                context = new AnnotationConfigApplicationContext("com.haozi");

        DataSourcelConfig globalConfig = new BaiduConfig();
        DataMonitor getdataHandler = context.getBean(DataMonitor.class);
        getdataHandler.start(globalConfig);

    }


}
